package cn.wolfcode.p2p.business.mapper;

import cn.wolfcode.p2p.business.domain.Bid;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface BidMapper {
    int insert(Bid record);
    Bid selectByPrimaryKey(Long id);
    int updateByPrimaryKey(Bid record);

        BigDecimal getUserBidSumByBidRequestId(@Param("userId") Long userId, @Param("bidRequestId") Long bidRequestId);

        void batchUpdateState(@Param("bidRequestId") Long bidRequestId, @Param("bidRequestState") int bidRequestState);
    List<Bid> selectBids(Long id);
}